package com.xj.demo.classcommand;

public class SynchronizedTest {
    private int i = 0;
    public synchronized void method1(){
        i++;
    }

    public void method2(){
        synchronized(SynchronizedTest.class){
            i++;
        }
    }
}
